package cn.zyq.charging.order.feign;

import cn.zyq.charging.common.pojo.JsonResult;
import cn.zyq.charging.common.pojo.param.GunStatusUpdateParam;
import cn.zyq.charging.common.pojo.vo.StationInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//@FeignClient注解的值要和nacos服务列表里的服务名称一致
@FeignClient(name="deviceService")
public interface DeviceClient {

    @GetMapping("/device/stationInfo/{gunId}")
    JsonResult<StationInfoVO> getStationInfo(@PathVariable("gunId")  Integer gunId);

    @PostMapping("/device/station/gun/updateStatus")
    JsonResult<Boolean> updateGunStatus(@RequestBody GunStatusUpdateParam gunStatusUpdateParam);

}